package com.example.guardian.client.manager;

import com.example.guardian.client.message.model.MessageModel;
import com.google.common.collect.Lists;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 事务消息manager
 *
 * @author gang.wang 2021/12/9
 */
@Component
public class TransactionMessageManager {

    /**
     * 获取事务发起者是否执行完毕
     */
    public List<MessageModel> listMessageCallback(){
        return Lists.newArrayList();
    }

    /**
     * 获取需要重新发送消息的事务
     */
    public List<MessageModel> listMessageSend(){
        return Lists.newArrayList();
    }

    /**
     * 获取需要重新发送消息的事务
     */
    public MessageModel getByMessageId(String messageId){
        return new MessageModel();
    }

    /**
     * 更新事务消息
     */
    public Boolean update(MessageModel messageModel){
        return true;
    }

    /**
     * 更新事务消息
     */
    public Boolean add(MessageModel messageModel){
        return true;
    }
}
